@extends('admin.layouts.app')
@section('css')
@endsection

@section('content')
<div class="">
	<div class="page-title">
		<div class="title_left">
			<h3>用户管理</h3>
		</div>
	</div>

	<div class="clearfix"></div>
	<div class="row">
		<div class="col-md-12 col-sm-12 col-xs-12">
			<div class="x_panel">
				<div class="x_title">
					<h2>显示用户</h2>
					<div class="clearfix"></div>
				</div>
				<div class="x_content">
					<br />
					<form class="form-horizontal form-label-left reset"  action="{{route('user.reset',['id'=>$user['id']])}}" method="post">
						<div class="col-xs-6 col-xs-offset-3">
							<h5>用户名：{{$user['username']}}</h5>
						</div>
						<div class="col-xs-6 col-xs-offset-3">
							<h5>名称：{{$user['name']}}</h5>
						</div>
						<div class="col-xs-6 col-xs-offset-3">
							<h5>邮箱：{{$user['email']}}</h5>
						</div>
						<div class="col-xs-6 col-xs-offset-3">
							<h5>超级管理员：{!! $user['is_super']?"<i class='fa fa-check'></i>":"<i class='fa fa-close'></i>" !!}</h5>
						</div>
						<div class="col-xs-6 col-xs-offset-3">
							{{ csrf_field() }}
							<input class="btn btn-danger reset" type="button" value="重置密码"/>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
@endsection

@section('js')
<script type="text/javascript">
	$(function(){
		$("input.reset[type='button']").click(function(){
			layer.confirm('确定充值密码？', {
				btn: ['确定', '取消'],
				icon: 5,
			},function(index){
				$("form.reset").submit();
				layer.close(index);
			});
		});
	})
</script>
@endsection
